package com.flexcodejam.vfd.business
{
	import mx.rpc.IResponder;
	import com.adobe.cairngorm.business.ServiceLocator;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.AbstractOperation;
	import mx.collections.IList;
	import mx.collections.ListCollectionView;
	import mx.collections.ICollectionView;
	import mx.collections.ArrayCollection;
	import com.flexcodejam.vfd.business.BaseBusinessDelegateMock;
	import com.flexcodejam.vfd.vo.ScoreBoard;

	public class ScoreBoardDelegateMock extends BaseBusinessDelegateMock
	{
		public function ScoreBoardDelegateMock(responder : IResponder){
			super(responder);
			this.Latency=2000;
		}		
		
		public function getScores() : void
		{	
			//create the mockup list of scores that represent data from the web servicer
			var pages:ICollectionView = createScores()
			//call async responder from the mock basebusinessdelegate
			setResults(pages);		
		}
		
	private function createScores():ICollectionView
	{
		var scoreBoard:ArrayCollection = new ArrayCollection();
	
		//this mockup data will want to represent more of the actual schema obv
		var score1:String = "score 1";
		scoreBoard.addItem(score1);
		
		var score2:String = "score 2";
		scoreBoard.addItem(score2);
		
		return scoreBoard;
	}		
	
	}

}